<html>
<head><meta charset="utf-8"><title>Feasibility of crosslinking symbols in snippets w/ rustdoc · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html">Feasibility of crosslinking symbols in snippets w/ rustdoc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220890457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890457">(Dec 24 2020 at 21:04)</a>:</h4>
<p>Hello!  I'm new to the rust-lang Zulip, so let me know if there's a better "stream" for this to go on of which I'm unawares.</p>
<p>The more I use Rust documentation, the more I wish I could just click on symbols in code snippets.  To that end, I've started digging around in <code>librustdoc</code> myself.</p>
<p>Before I get too deep into it, though, it seemed a good idea to ask <strong>how feasible would this be?</strong>  (And is anyone already working on this.)  Would this be as simple as wiring up the existing markdown-associated symbol linking functionality or are there some hidden gotchas to which I'm still naive?</p>
<p>To the end of helping further digging on my part: is there some way to run <code>cargo doc</code> on <code>librustdoc</code>?  AFAICT <code>librustdoc</code> <em>must</em> be built from the root workspace for the <code>rust</code> repo (a number of dependencies aren't actually referenced from within the <code>librustdoc</code> <code>Cargo.toml</code>) and I've yet to craft the appropriate runic arrangement when incanting <code>cargo doc</code>.  Is there some build documentation for <code>librustdoc</code> that I've overlooked?</p>
<p>Thank you :).</p>



<a name="220890554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890554">(Dec 24 2020 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="373624">@akesling</span> you can see documentation for rustdoc itself at either <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/">https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/</a> (generated) or <a href="https://rustc-dev-guide.rust-lang.org/rustdoc.html">https://rustc-dev-guide.rust-lang.org/rustdoc.html</a> (guide)</p>



<a name="220890596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890596">(Dec 24 2020 at 21:08)</a>:</h4>
<p>I doubt there is anyone already working on this. It seems useful and in scope, although I'd expect it to be a fairly large project.</p>



<a name="220890606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890606">(Dec 24 2020 at 21:08)</a>:</h4>
<p><a class="stream" data-stream-id="266220" href="/#narrow/stream/266220-rustdoc">#rustdoc</a> is a better stream but I'd rather keep the discussion in one place</p>



<a name="220890620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890620">(Dec 24 2020 at 21:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/html/format.rs#L480">https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/html/format.rs#L480</a> is the function you want</p>



<a name="220890692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890692">(Dec 24 2020 at 21:11)</a>:</h4>
<p>this is <a href="https://github.com/rust-lang/rust/issues/62986#issuecomment-515274928">https://github.com/rust-lang/rust/issues/62986#issuecomment-515274928</a> I think</p>



<a name="220890752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890752">(Dec 24 2020 at 21:12)</a>:</h4>
<p>by code snippets, you mean source view, right?</p>



<a name="220890756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890756">(Dec 24 2020 at 21:12)</a>:</h4>
<p>doing it in doc tests would be trickier I think</p>



<a name="220890898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890898">(Dec 24 2020 at 21:16)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I was specifically thinking for the snippets in the docs themselves as those are the more common things I can <em>see</em>, but general source view linking would be fabulous as well.</p>



<a name="220890904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890904">(Dec 24 2020 at 21:17)</a>:</h4>
<p>oof. the snippets in the docs will be a lot harder because right now rustdoc doesn't analyze them at all, just pass them through to the rust compiler for syntax highlighting</p>



<a name="220890910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890910">(Dec 24 2020 at 21:17)</a>:</h4>
<p>and in general, not all links will be available because some symbols will only be defined in teh example itself</p>



<a name="220890958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890958">(Dec 24 2020 at 21:18)</a>:</h4>
<p>see also <span class="user-mention" data-user-id="265377">@Will Crichton</span>'s work on going the other way and linking from the methods to the examples: <a href="https://github.com/willcrichton/example-analyzer">https://github.com/willcrichton/example-analyzer</a></p>



<a name="220890959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220890959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220890959">(Dec 24 2020 at 21:18)</a>:</h4>
<p>that has its own issues with cyclic dependencies</p>



<a name="220891162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891162">(Dec 24 2020 at 21:23)</a>:</h4>
<p>TBH, as a user, I'd be alright with only a subset of symbols being linked.  It would still be a marked improvement over _none_.</p>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span>  Aren't snippets compiled at some point to test that they work?  Is the issue that the "doc tests" pass is just unrelated to the formatting/linking one?</p>



<a name="220891214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891214">(Dec 24 2020 at 21:24)</a>:</h4>
<p>correct, rustdoc doesn't <em>quite</em> run rustc as an external process on doctests, but it's pretty close</p>



<a name="220891216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891216">(Dec 24 2020 at 21:24)</a>:</h4>
<p>none of the type information is currently available</p>



<a name="220891226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891226">(Dec 24 2020 at 21:24)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/doctest.rs#L104">https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/doctest.rs#L104</a></p>



<a name="220891233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891233">(Dec 24 2020 at 21:25)</a>:</h4>
<p>now you can get the information, but you'd definitely be paving new paths <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="220891381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891381">(Dec 24 2020 at 21:28)</a>:</h4>
<p>Thank you for the info :).  Perhaps I'll start by naively rewriting <code>use</code> statements and feeding those directly into the symbol linker...  see how far that gets me to a better understanding of the larger scope of the issue :P.</p>



<a name="220891406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891406">(Dec 24 2020 at 21:29)</a>:</h4>
<p>'the symbol linker' takes DefIds, not strings</p>



<a name="220891410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891410">(Dec 24 2020 at 21:29)</a>:</h4>
<p>it's <code>fn href</code> that I pointed to in <a href="#narrow/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc/near/220890620">https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc/near/220890620</a></p>



<a name="220891451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891451">(Dec 24 2020 at 21:30)</a>:</h4>
<p>Right, but there's <em>something</em> that goes from "[<code>SymbolFoo</code>]" in the markdown to that DefId, no?</p>



<a name="220891485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891485">(Dec 24 2020 at 21:30)</a>:</h4>
<p>if you do want to work on this, I'd suggest changing <code>HirCollector</code> to use <code>fn href</code> and finding a way to link that into <code>render</code> <a href="https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/doctest.rs#L946">https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/doctest.rs#L946</a></p>



<a name="220891486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891486">(Dec 24 2020 at 21:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="373624">akesling</span> <a href="#narrow/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc/near/220891451">said</a>:</p>
<blockquote>
<p>Right, but there's <em>something</em> that goes from "[<code>SymbolFoo</code>]" in the markdown to that DefId, no?</p>
</blockquote>
<p>that requires scope information, which you don't have for strings</p>



<a name="220891497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891497">(Dec 24 2020 at 21:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/passes/collect_intra_doc_links.rs#L767">https://github.com/rust-lang/rust/blob/0edce6f4bbb4514482537f569f0b8ef48e71e0a0/src/librustdoc/passes/collect_intra_doc_links.rs#L767</a></p>



<a name="220891602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891602">(Dec 24 2020 at 21:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc/near/220891486">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="373624">akesling</span> <a href="#narrow/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc/near/220891451">said</a>:</p>
<blockquote>
<p>Right, but there's <em>something</em> that goes from "[<code>SymbolFoo</code>]" in the markdown to that DefId, no?</p>
</blockquote>
<p>that requires scope information, which you don't have for strings</p>
</blockquote>
<p>for example <code>::warp</code> won't resolve inside the crate itself, crates don't know their own names</p>



<a name="220891787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Feasibility%20of%20crosslinking%20symbols%20in%20snippets%20w/%20rustdoc/near/220891787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> akesling <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Feasibility.20of.20crosslinking.20symbols.20in.20snippets.20w.2F.20rustdoc.html#220891787">(Dec 24 2020 at 21:37)</a>:</h4>
<p>You've definitely given me plenty to chew on.  I'll continue poking around and will let you know if I have any more questions. Thank you!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>